package cn.vendpay.com.service;

import cn.vendcommon.com.entity.VideoItem;
import io.minio.errors.*;

import java.io.IOException;
import java.security.InvalidKeyException;
import java.security.NoSuchAlgorithmException;
import java.util.List;

public interface VideoService {
    void videoStartTest(int machineId, int time);
    /**
     * 保存视频信息
     * @param videoItem
     */
    public void insertVideoItem(VideoItem videoItem);

    /**
     * 根据状态取到前limitNum个视频信息
     * @param status
     * @param limitNum
     * @return
     */
    public List<VideoItem> getVideoItemsByStatusLimitNum(int status, int limitNum);


    /**
     * 批量更新视频状态
     * @param videoItems 要更新的视频列表
     * @return 受影响的行数
     */
    void updateStatus(List<VideoItem> videoItems);

    boolean videoStartTestByUrl(int userId, String url, int machineId, int i);

    List<VideoItem> getVideoItemsByStatus(int status);

    String playVideoByVideoId(int videoId);

    void deleteByVideoId(int videoId) throws ServerException, InsufficientDataException, ErrorResponseException, IOException, NoSuchAlgorithmException, InvalidKeyException, InvalidResponseException, XmlParserException, InternalException;
}
